using System.Collections.Generic;
using System.Data;
using System.Threading.Tasks;
using Comteck.Dto.Sys;

namespace Comteck.Ktt.Services.Sys {
  /// <summary>
  /// 
  /// </summary>
  public interface IPrintTemplateService : IScopedDependency {
    /// <summary>
    /// 查询全部列表
    /// </summary>
    /// <returns></returns>
    Task<IEnumerable<PrintTemplateDto>> GetAllAsync();

    /// <summary>
    /// 删除
    /// </summary>
    /// <param name="id"></param>
    /// <returns></returns>
    Task<AjaxResponse> DeleteAsync(string id);

    /// <summary>
    /// 
    /// </summary>
    /// <param name="templateId"></param>
    /// <returns></returns>
    Task<IEnumerable<PrintTemplateDataDto>> GetDetailListByTemplateIdAsync(string templateId);

    /// <summary>
    /// 
    /// </summary>
    /// <param name="id"></param>
    /// <returns></returns>
    Task<PrintTemplateDto> GetEditModelAsync(string id);

    /// <summary>
    /// 保存
    /// </summary>
    /// <param name="model"></param>
    /// <returns></returns>
    Task<AjaxResponse<PrintTemplateDto>> SaveAsync(PrintTemplateDto model);

    /// <summary>
    /// 获得打印数据源(支持单字段)
    /// </summary>
    /// <param name="model"></param>
    /// <returns></returns>
    Task<DataSet> GetPrintTemplatePrintDataSource(PrintTemplateQuery model);

    /// <summary>
    /// 
    /// </summary>
    /// <param name="menuId"></param>
    /// <returns></returns>
    Task<List<PrintTemplateDto>> GetListByMenuIdAsync(string menuId, int? status);
  }
}
